<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=\, initial-scale=1.0">
    <title>12-v-model在radio中使用</title>
</head>
<body>
    <div id="app">
        <!-- name 相同为同一组 -->
        <label for="male">
            <input type="radio" name="gender" id="male" value="男" v-model="gender">
            男
        </label>
        <label for="female">
            <input type="radio" name="gender" id="female" value="女" v-model="gender">
            女
        </label>
        <h1>当前选择的性别为: {{gender}}</h1>
    </div>
    <script src="./js/vue.js"></script>
    <script>
        const app = new Vue({
            el: "#app",
            data: {
                gender:"男"
            }
        })
    </script>
</body>

</html>